import 'package:flutter/material.dart';
import 'package:flutterdemo01/demo1/page/search.dart';

class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: ElevatedButton(

          onPressed: () {
            Navigator.of(context).push(
              MaterialPageRoute(builder: (context){return SearchPage();})
            );
          },
          child: Text('按钮'),
      ),
    );
  }
}
